package com.dmzc.stage2.chapter14;

/**
 * 枚举的方式实现
 *
 */
public enum Singleton6 {
    INSTANCE;
    private byte[]data=new byte[1024];
    Singleton6(){
        System.out.println("INSTANCE will be initialized immediately");
    }
    public static void method(){

    }
    public static Singleton6 getInstance(){
        return INSTANCE;
    }
}
